/*=====================================================================================================================
                    Copyright(c) 2005 Geometric PLM Software Corp. All rights reserved.
                             Unpublished - All rights reserved
=======================================================================================================================
File description:
    Filename: tc_epm.h
    Module  : (geometric) itk module.

        This file manages the operations of EPM(Enterprise Process Modeling).

=======================================================================================================================
Date               Name              Description of Change
28-Jul-2009        Penn,Xie          Initialize creation
$HISTORY$
=====================================================================================================================*/
#ifndef GITK_TC_EPM_H
#define GITK_TC_EPM_H

enum GEPM_Action_find_type_e
{
    GAFT_EX_TCTYPE = 0,
    GAFT_EX_WSO,
};


#ifdef __cplusplus
    extern "C"
    {
#endif

    /**
    * Gets the matched objects in the action task.
    * @param task     - <I> tag of the task
    * @param typeName - <I> the type name
    * @param objCnt   - <O> the tag number of the matched type
    * @param objects  - <I> the tags of the matched type
    * @return - ITK_Ok or error code
    *
    *    Gets the selected ItemRevision objects in the workflow, and get all objects which is the type of the appointed rev_type.
    *    If nothing is found, exits the process and reports the error.
    */
    int GEPM_get_action_objects( tag_t task, const char *typeName, int *objCnt, tag_t **objects );

    /**
    * Gets the matched objects in the action task.
    * @param task     - <I> tag of the task
    * @param enumType - <I> object find-type
    * @param typeName - <I> the type name
    * @param objCnt   - <O> the tag number of the matched type
    * @param objects  - <I> the tags of the matched type
    * @return - ITK_Ok or error code
    *
    *    Gets the selected ItemRevision objects in the workflow, and get all objects which is the type of the appointed rev_type.
    *    If nothing is found, exits the process and reports the error.
    */
    int GEPM_ask_action_objects( tag_t task, enum GEPM_Action_find_type_e enumType, const char *typeName, int *objCnt, tag_t **objects );

    /**
    * Whether exist the object in root task.
    * @param rootTask - <I> tag of the root task
    * @param object   - <I> object
    */
    logical GEPM_is_exist_object( tag_t rootTask, tag_t object );

    /**
    * Finds the task type by status name.@see ptasktype table in oracle
    * @param statusName - <I> The name of the status. like "TCM Release"
    * @param found      - <O> is found?
    * @param taskType   - <O> task type tag. if found = true, taskType != NULLTag
    */
    int GEPM_find( const char *statusName, logical *found, tag_t *taskType );

#ifdef __cplusplus
    }
#endif


#endif //GITK_TC_EPM_H
